package org.jiucheng.magpiebridge.server.aio;

import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;

import org.jiucheng.magpiebridge.server.aio.proxy.ProxyServerAttachment;

public class ClientWriteAttachment {

    private ByteBuffer writeBuffer;
    private ProxyServerAttachment proxyAttachment;
    private AsynchronousSocketChannel proxyAsynchronousSocketChannel;
    private int uri;
    
    private ByteBuffer readByteBuffer;

    public ClientWriteAttachment(ByteBuffer writeBuffer, ProxyServerAttachment proxyAttachment) {
        this.writeBuffer = writeBuffer;
        this.proxyAttachment = proxyAttachment;
    }
    
    public ByteBuffer getWriteBuffer() {
        return writeBuffer;
    }
    
    public ClientWriteAttachment setWriteBuffer(ByteBuffer writeBuffer) {
        this.writeBuffer = writeBuffer;
        return this;
    }
    
    public ProxyServerAttachment getProxyAttachment() {
        return proxyAttachment;
    }
    
    public AsynchronousSocketChannel getProxyAsynchronousSocketChannel() {
        return proxyAsynchronousSocketChannel;
    }
    
    public ClientWriteAttachment setProxyAsynchronousSocketChannel(AsynchronousSocketChannel proxyAsynchronousSocketChannel) {
        this.proxyAsynchronousSocketChannel = proxyAsynchronousSocketChannel;
        return this;
    }
    
    public int getUri() {
        return uri;
    }
    
    public ClientWriteAttachment setUri(int uri) {
        this.uri = uri;
        return this;
    }
    
    public ByteBuffer getReadByteBuffer() {
        return readByteBuffer;
    }
    
    public ClientWriteAttachment setReadByteBuffer(ByteBuffer readByteBuffer) {
        this.readByteBuffer = readByteBuffer;
        return  this;
    }
}
